import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:top_foundation/top_foundation.dart';

import 'index.dart';
import 'widgets/widgets.dart';

class AnimateImagePage extends GetView<AnimateImageController> {
  const AnimateImagePage({Key? key}) : super(key: key);

  // 主视图
  Widget _buildView() {
    return ListView(
      children: [
        Container(
          width: 100,
          height: 100,
          child: FrameImage(
              imgs: List.generate(
                  3, (index) => 'assets/chat_bubble_voice_ripple0$index.png')),
        ),
      ],
    );
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<AnimateImageController>(
      builder: (_) {
        return Scaffold(
          appBar: AppBar(title: const Text("animate_image")),
          body: SafeArea(
            child: _buildView(),
          ),
        );
      },
    );
  }
}
